import request from '@/utils/request'

const deptList = (params: any) => {
    return request({
        url: "/sysDept",
        method: "get",
        params: params
    })
}

const addDept = (data: any) => {
    return request({
        url: "/sysDept",
        method: "post",
        data: data
    })
}

const deleteDept = (id: number) => {
    return request({
        url: `/sysDept/${id}`,
        method: "delete",
    })
}


const updateDept = (data: any) => {
    return request({
        url: "/sysDept",
        method: "put",
        data: data
    })
}

const getDept = (id: number) => {
    return request({
        url: `/sysDept/${id}`,
        method: "get",
    })
}



export { deptList, addDept, updateDept }
